package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import util.PropertyLoader;

/**
 * Created by 1 on 06.04.2014.
 */
public class KidsPage extends BasePage
{
    private static final String URL_HOME_PAGE = PropertyLoader.loadProperty("site.url");
    private static final String URL_KIDS_PAGE =("http://rozetka.com.ua/kids/c88468/");

    private static final By KIDS_LINK = By.xpath("//*[@id=\"kids\"]/div/a");

    public KidsPage (WebDriver driver) {
        super(driver);
    }

    public void openKidsPage()
    {
        driver.get(URL_HOME_PAGE);
        driver.findElement(KIDS_LINK).click();
    }

    public boolean kidsPageIsOpened()
    {
        return driver.getCurrentUrl().equals(URL_KIDS_PAGE);
    }
}
